package java8;

/**
 * Created by Administrator on 2022/10/24.
 */
public class LambdaDemo {
    public static int f(int x) {
        return 2 * x;
    }

    public static void main(String[] args) {
        //map
        int[] a = new int[]{1, 2, 3, 4, 5};
        int[] b = new int[a.length];
        for (int i = 0; i < a.length; i++) {
            b[i] = f(a[i]);
        }

    }
}
